import service from "@/requset/requset.js";

export function addModelApi(data) {
    return service({
        url: '/healthModel/add',
        method: 'post',
        data: data
    })
}
export function addModelAdminApi(data) {
    return service({
        url: '/healthModel/addAdmin',
        method: 'post',
        data: data
    })
}
export function getMyModelApi(type) {
    return service({
        url: '/healthModel/getMyModel',
        params:{
            modelType:type
        }
    })
}
export function deleteModelApi(id){
    return service({
        url:'/healthModel/deleteModel',
        params:{
            id:id
        }
    })
}

export function addModelRecordApi(data) {
    return service({
        url: '/healthModel/addModelRecord',
        method: 'post',
        data: data
    })
}
export function getModelRecordApi() {
    return service({
        url: '/healthModel/getModelRecord',
    })
}
export function deleteModelRecordApi(id){
    return service({
        url:'/healthModel/deleteModelRecord',
        params:{
            id:id
        }
    })
}

export  function getModelNameChartApi(){
    return service({
        url:'/healthModel/getModelName'
    })
}
export function getChartDataApi(id){
    return service({
        url:'/healthModel/getChartData',
        params:{
            id:id
        }
    })
}
export function getModelAllApi(data){
    return service({
        url:'/healthModel/getMyModelAll',
        method:"post",
        data:data
    })
}